package org.jsola.contract.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.contract.dto.AccountAddDTO;
import org.jsola.contract.dto.AccountUpdateDTO;
import org.jsola.contract.query.AccountQuery;
import org.jsola.contract.vo.AccountListVO;
import org.jsola.contract.vo.AccountVO;
import org.jsola.core.Page;
import org.jsola.core.Result;

import java.util.List;

/**
 * 账户信息
 *
 * @author JanusMix
 */
@Api(tags = "contract-账户信息")
public interface IAccountControllerAPI {

    /**
     * 新增账户信息
     * @param accountAddDTO 账户信息新增实体
     * @return 账户信息展示对象
     */
    @ApiOperation(value = "新增账户信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "accountAddDTO", dataType = "AccountAddDTO", value = "新增账户信息", paramType = "body")
    })
    Result<AccountVO> save(AccountAddDTO accountAddDTO);


    /**
     * 修改账户信息
     * @param accountUpdateDTO 账户信息
     * @return 更新数量
     */
    @ApiOperation(value = "修改账户信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "accountUpdateDTO", dataType = "AccountUpdateDTO", value = "修改账户信息", paramType = "body")
    })
    Result<Integer> update(AccountUpdateDTO accountUpdateDTO);




    /**
     * 删除单个账户信息，彻底删除
     * @param accountId 账户信息id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个账户信息，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "accountId", dataType = "String", value = "账户信息id", paramType = "path")
    })
    Result<Integer> delete(String accountId);


    /**
     * 批量删除账户信息，彻底删除
     * @param accountIds 账户信息id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除账户信息，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "accountIds", dataType = "String[]", value = "账户信息id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] accountIds);


    /**
     * 根据账户信息id查询账户信息详情
     * @param accountId 账户信息id
     * @return 账户信息详情
     */
    @ApiOperation(value="根据账户信息id查询账户信息详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "accountId", dataType = "String", value = "账户信息id", paramType = "path")
    })
    Result<AccountVO> findById(String accountId);


    /**
     * 查询账户信息
     * @param accountQuery 账户信息查询参数
     * @return page
     */
    @ApiOperation(value="查询账户信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "accountQuery", dataType = "AccountQuery", value = "账户信息查询参数", paramType = "query")
    })
    Result<List<AccountListVO>> listAll(AccountQuery accountQuery);


     /**
     * 分页查询账户信息
     * @param accountQuery 账户信息查询参数
     * @return page
     */
    @ApiOperation(value="分页查询账户信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "accountQuery", dataType = "AccountQuery", value = "账户信息查询参数", paramType = "query")
    })
    Result<Page<AccountListVO>> page(AccountQuery accountQuery);


}

